#include <iostream>

using namespace std;

/* 无参构造想调用有参构造必须使用初始化列表*/
class Person
{
public:
    Person()
    {
        cout<<"父类无参构造"<<endl;
        m_address = new char[32];
    }

    ~Person()
    {
        cout<<"父类析构函数 "<<endl;
        delete []this->m_address;
    }

private:
    int m_age;
    char * m_address;
};

class Student : public Person
{
public:
    Student()
    {
        cout<<"子类无参构造"<<endl;
        m_name = new char[32];
    }
    ~Student()
    {
        cout<<"子类析构函数 "<<endl;
        delete []this->m_name;
        m_name = NULL;
    }

public:
    int m_no;
    char * m_name;
};

int main()
{

    return 0;
}